package com.lineage.server.serverpackets;

/**
 *角色座標名單
 * @author dexc
 *
 */
public class S_Bookmarks extends ServerBasePacket {

	private byte[] _byte = null;

	/**
	 * 角色座標名單
	 * @param name
	 * @param map
	 * @param id
	 */
	public S_Bookmarks(final String name, final int map, final int id) {
		this.buildPacket(name, map, id);
	}

	private void buildPacket(final String name, final int map, final int id) {
		//0000: 0d 30 30 30 31 00 04 00 3e 82 3f 80 d8 26 4c b8    .0001...>.?..&L.
		this.writeC(S_OPCODE_BOOKMARKS);
		this.writeS(name);
		this.writeH(map);
		this.writeD(id);
	}

	@Override
	public byte[] getContent() {
		if (this._byte == null) {
			this._byte = this.getBytes();
		}
		return this._byte;
	}

	@Override
	public String getType() {
		return this.getClass().getSimpleName();
	}
}